#ifndef _FPU_H_
#define _FPU_H_

#include <types.h>

typedef struct user_i387_struct fpustate_t;
typedef struct user_fxsr_struct fxsrstate_t;

struct user_i387_struct {
    long cwd;
    long swd;
    long twd;
    long fip;
    long fcs;
    long foo;
    long fos;
    long st_space[20];		/* 8*10 bytes for each FP-reg = 80 bytes */
};

struct user_fxsr_struct {
    uint16_t cwd;
    uint16_t swd;
    uint16_t twd;
    uint16_t fop;
    long fip;
    long fcs;
    long foo;
    long fos;
    long mxcsr;
    long reserved;
    long st_space[32];		/* 8*16 bytes for each FP-reg = 128 bytes */
    long xmm_space[32];		/* 8*16 bytes for each XMM-reg = 128 bytes */
    long padding[56];
};

#endif				// _FPU_H_
